package com.ruoyi.repayment.mapper;

import com.baomidou.mybatisplus.core.mapper.Mapper;
import com.bt.san.domain.Benjin;
import com.bt.san.domain.suchrates;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SuchratesMapper {
    @Insert(value = "insert into loan_suchrates (ments,principal,interests,figure,months,zprice,interestCount,applyforId,userId) value(#{ments},#{principal},#{interests},#{figure},#{months},#{zprice},#{interestCount}#{applyforId},#{userId})")
    void insertinto(suchrates suchrates);
    @Select(value = "select * from loan_suchrates where applyforId=#{id} and userId=#{userId}")
    List<Benjin> Calculatexq(@Param("id") Integer id,@Param("userId") Integer userId);

    @Select(value = "select * from loan_suchrates where id=#{id}")
    suchrates findsuchratesId(Long id);
}
